From 94d57a7ff5157d5397675f130fa3cd859f33fc89 Mon Sep 17 00:00:00 2001 From: "mafetter@fleming.research" Date: Wed, 23 Mar 2005 12:50:40 +0000 Subject: [PATCH] bitkeeper revision 1.1256 (42416620txO4y-haxDQfKlP_6mTC8Q) Prevent buddy-allocator merges across Xen/Domain zones boundary. Signed-off-by: Keir Fraser Signed-off-by: Michael A Fetterman --- xen/common/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index ea81c9b0af..097008b9f3 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -403,6 +403,13 @@ void init_xenheap_pages(unsigned long ps, unsigned long pe) memguard_guard_range(__va(ps), pe - ps); + /* + * Yuk! Ensure there is a one-page buffer between Xen and Dom zones, to + * prevent merging of power-of-two blocks across the zone boundary. + */ + if ( !IS_XEN_HEAP_FRAME(phys_to_page(pe)) ) + pe -= PAGE_SIZE; + local_irq_save(flags); init_heap_pages(MEMZONE_XEN, phys_to_page(ps), (pe - ps) >> PAGE_SHIFT); local_irq_restore(flags); -- 2.30.2